package com.tanhua.test;

import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@SpringBootTest
@RunWith(SpringRunner.class)

public class testNear {


/*    @Autowired
    private MongoTemplate mongoTemplate;
    @Test
    public void testNear() {
        //构造坐标点
        GeoJsonPoint point = new GeoJsonPoint(116.404, 39.915);
        //构造半径
        Distance distanceObj = new Distance(1, Metrics.KILOMETERS);
        //画了一个圆圈
        Circle circle = new Circle(point, distanceObj);
        //构造query对象
        Query query = Query.query(Criteria.where("location").withinSphere(circle));
        //省略其他内容
        List<Places> list = mongoTemplate.find(query, Places.class);
        list.forEach(System.out::println);
    }*/
}
